import request from '@/utils/request'

/**
 * 获取工单自定义数据
 * @param getShopOrderCustomData
 */
export function getShopOrderCustomData(data) {
  return request({
    url: `/md/commonCustomDatas/getShopOrderCustomData`,
    method: 'get',
    params: data
  })
}

/**
 * 查询工单数据弹出框
 * @param list
 */
export function selectPageShopOrder(data) {
  return request({
    url: `/md/commonBrowsers/selectPageShopOrder`,
    method: 'post',
    data
  })
}
/**
 * 模糊查询物料数据弹出框
 * @param list
 */
export function selectPageItem(data) {
  return request({
    url: `/md/commonBrowsers/selectPageItem`,
    method: 'post',
    data
  })
}

/**
 * 查询物料清单数据弹出框
 * @param list
 */
export function selectPageBom(data) {
  return request({
    url: `/md/commonBrowsers/selectPageBom`,
    method: 'post',
    data
  })
}

/**
 * 模糊查询工艺路线弹出框
 * @param list
 */
export function selectPageRouter(data) {
  return request({
    url: `/md/commonBrowsers/selectPageRouter`,
    method: 'post',
    data
  })
}

/**
 * 查询产线数据弹出框
 * @param list
 */
export function selectPageProductLine(data) {
  return request({
    url: `/md/commonBrowsers/selectPageProductLine`,
    method: 'post',
    data
  })
}

/**
 * 查询客户订单数据弹出框
 * @param list
 */
export function selectPageCustomerOrder(data) {
  return request({
    url: `/md/commonBrowsers/selectPageCustomerOrder`,
    method: 'post',
    data
  })
}
/**
 * 通过工单查询数据
 * @param inquire
 */
export function inquireShopOrders(shopOrders) {
  return request({
    url: `/md/shopOrders/query`,
    method: 'get',
    params: shopOrders
  })
}
/**
 * 保存
 * @param sitesSave
 */
export function saveShopOrders(data) {
  return request({
    url: `/md/shopOrders/save`,
    method: 'post',
    data
  })
}

/**
 * 删除
 * @param delete
 */
export function deleteShopOrders(data) {
  return request({
    url: `/md/shopOrders/delete`,
    method: 'get',
    params: data
  })
}
